<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>  
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <base href="<%=basePath%>">
    <title>青海省高等级公路青通卡电子客服系统</title>
	<link href="<%=request.getContextPath()%>/css/login.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery-1.7.1.js"></script>
	<script type="text/javascript" src="<%=request.getContextPath()%>/js/common.js"></script>
	<script type="text/javascript"  src="<%=request.getContextPath()%>/dwr/util.js"></script>
	<script type="text/javascript" src="<%=request.getContextPath()%>/dwr/engine.js"></script>
	<script type='text/javascript' src="<%=request.getContextPath()%>/dwr/interface/LoginDwr.js"></script>
	<script type="text/javascript">
		//回车按钮事件处理  
		$(document).keyup(function(event){
   		 	if(event.keyCode ==13){          
     			$("#login").trigger("click");//选取id为"login"的元素,并触发该元素的click事件
    	 	 }
     	});
     	$(function() {
        	$('#login').click(function() {
        	$("#msg").html('正在登录系统.....');
        		var operID = $("#operID").val();
				var pwd = $("#pwd").val();
				if (operID=='') {
					 $("#msg").html("请填写工号");
					 $("#operID").focus();
					 return false;
				}
				if (pwd=='') {
					 $("#msg").html("请填写密码");
					  $("#pwd").focus();
					 return false;
				}
			//var sPsamId=Web800.ReadPSAM();
			var sPsamId=100002;
			var pasm = $("#PSAM").val();
		   	var ip = $("#IP").val();
		   	var mac = $("#MAC").val();
		   	var term = $("#Term").val();
				oper=parseInt(operID, 10);
				LoginDwr.operCheck(sPsamId,oper,pwd,ip,term,function(data){
				if(data == "") {
					location.href='<%= request.getContextPath() %>/jsp/MyIndex.jsp';
				}else {
					$('#msg').html(data);
				}
			});
            });
        });
           function closeLogin() {
        	window.close();
        }
	</script>
  </head>
  
  
  <body>
  <form class="login_form" name="login">
			  	<div class="login">
			    <div class="box png">
					<div class="logo png"></div>
					
					<div class="input">
						<div class="log">
							<div class="name">
								<label>工　号</label><input type="text" class="text" name="operID"  id="operID" placeholder="工号"  tabindex="1">
							</div>
							<div class="pwd">
								<label>密　码</label><input type="password" class="text" name="pwd"  id="pwd"  placeholder="密码"  tabindex="2">
								<input type="button" class="submit" tabindex="3" value="登录" id="login">
								<div class="check"></div>
								<p align="center"><span id="msg" style="color:red;"></span></p>
							</div>
							<div class="tip"></div>
						</div>
					</div>
				</div>
			    <div class="air-balloon ab-1 png"></div>
				<div class="air-balloon ab-2 png"></div>
			    <div class="footer"></div>
			    <s:hidden name="posTerm.PSAM" id="PSAM" value="131000000001"></s:hidden>
    			<s:hidden name="posTerm.IP" id="IP" value="10.44.111.129"></s:hidden>
    			<s:hidden name="posTerm.MAC" id="MAC" value=""></s:hidden>
    			<s:hidden name="posTerm.Term" id="Term" value="1"></s:hidden>
			</div>
			</form>
			<script type="text/javascript" src="../../js/jQuery.js"></script>
			<script type="text/javascript" src="../../js/fun.base.js"></script>
			<script type="text/javascript" src="../../js/script.js"></script>
			
			
			<!--[if IE 6]>
			<script src="js/DD_belatedPNG.js" type="text/javascript"></script>
			<script>DD_belatedPNG.fix('.png')</script>
			<![endif]-->
			<div style="text-align:center;margin:50px 0; font:normal 14px/24px 'MicroSoft YaHei';">
			</div>
	
</body>
<OBJECT id="Web800" codebase="<%= request.getContextPath() %>/jsp/eagleCardCom.cab"  classid=clsid:FDC10DDD-7FB3-4AC7-993A-B9D3E554E5D4></OBJECT>
</html>
